Read the message type out of the message before sending it to xenstored, and
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Sat, 15 Apr 2006 18:25:09 +0000 (19:25 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Sat, 15 Apr 2006 18:25:09 +0000 (19:25 +0100)
commit3ae4ba6c3c5214513ca7df3637eed62803203433
tree2bc79d3bbaf58735d86db6566c82923b80619d22
parentf9eb14bf6a6a5097885ce33573f75a2c3f3a1d5c
Read the message type out of the message before sending it to xenstored, and
use that saved value when handling the reply.  Xenstored will leave the
message type intact, _except_ when returning an error, in which case it will
change the type to XS_ERROR.  This meant that we failed to remove a
transaction from our internal list if xenstored returned EAGAIN, as we did not
realise that the message was XS_TRANSACTION_END.  This manifested itself as
the intended behaviour until the connection was closed, at which point all of
those failed transactions would erroneously be aborted.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c